package com.itheima.a08threadmethod5;

public class ThreadDemo1 {
    public static void main(String[] args) throws InterruptedException {
        //了解插入线程
        //1.创建线程对象
        MyThread t1 = new MyThread();
        //设置名字
        t1.setName("地雷");
        //2.启动线程
        t1.start();

        //插入线程
        t1.join();

        //3.主线程执行
        for (int i = 0; i < 10; i++) {
            System.out.println(Thread.currentThread().getName() + ":" + i);
        }
    }
}
